import Vue from 'vue'
import App from '@/module/containers/App'
import { Main, filter } from '@/common'

import '@/css/index.scss'

// require('es6-promise').polyfill()
import router from './router/index-router'

function init () {
  Object.keys(filter).forEach((key) => {
    Vue.filter(key, filter[key])
  })

  Main.impl().init()

  var vue = new Vue({ // eslint-disable-line
    el: '#app',
    router,
    render: h => h(App)
  })

  Main.impl().start(vue)
}

(function () {
  init()
})()
